﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Configuration;
using System.Data.SqlClient;

/// <summary>
/// Summary description for D_POS
/// </summary>
namespace Bestlife.ERP.DataAccess
{
  
public class D_POS
{
    double totalPrice;
    double point_val;
    double buss_val;

	public D_POS()
	{
		//
		// TODO: Add constructor logic here
		//
	}
    public string  pos(String disid)
    {
        SqlDataReader rdRStatus;
        string name="";
        try
        {

            String connStr = ConfigurationManager.ConnectionStrings["MainConnStr"].ConnectionString;
            Bestlife.ERP.DataAccess.clsCon.connect(connStr);


            String sqlstatus = "SELECT [Giv_Name]  FROM [Tbl_Distributor]  where Dis_ID='"+disid+"'";
           
            rdRStatus = clsCon.ReadTable(sqlstatus);


            if (rdRStatus.Read())
            {
                name = rdRStatus["Giv_Name"].ToString();

            }
            else 
            {
                name = "Invalid BLAA Number";
            }

            rdRStatus.Close();
        }


        catch (Exception err)
        {

        }

        finally
        {

            clsCon.conn_new.Close();

        }
        return name;



    }


    public double ReturnTotalPrice(double Price,double Quantity) 
    {
        totalPrice += Price*Quantity;
        return totalPrice;
    }
}
}